

<div id="pageInfo" data-title="短消息"></div>

<section class="coupon_list">
	<ul>
		{set:$queryMessageList = Api::run('getUcenterMessageList',$msgIds)}
		{foreach:items = $queryMessageList->find()}
		<li onclick='show_msg(this,{echo:JSON::encode($item)})'>
			<time>{$item['time']}</time>
			<i id="msg_id_{$item['id']}">
				{if:$msgObj->is_read($item['id'])}已读{else:}未读{/if}
			</i>
			<strong>{$item['title']}</strong>
		</li>
		{/foreach}
	</ul>
	{$queryMessageList->getPageBar()}
</section>
<section id="show_msg" class="complain none">
	<div class="close" onclick='$(this).parents("#show_msg").hide()'></div>
	<article id="content">最好免费赠送</article>
</section>


<script>
//阅读消息
function show_msg(_self,obj){
	$('#show_msg #content').html(obj.content);
	$('#show_msg').show();
	$.get("{url:/ucenter/message_read}",{"id":obj.id},function(data){
		if(data == 1){
			$("#msg_id_"+obj.id).addClass('bold');
			$("#msg_id_"+obj.id).html('已读');
		}
	});
}
$(function(){
	// 隐藏底部导航
	hideNav();
});
</script>